 
import std.stdio;
import std.conv;

struct Struct(T) if(is(T == class))
{
    T cla;
    int vaue = 10;
}

class Class
{
    int value;
}

void fun(T)(Struct!T * t)
{
    writeln("value = ", t.vaue);
}

class CC ( C , D = void)
{
    void showC()
    {
        writeln("C is : ");
    }
    
    static if(!is(D == void))
    {
          void showD()
        {
            writeln("D is : ");
        }
    }
}


void main()
{
    auto t1 = new Struct!Class;
    t1.vaue = 10;
    auto t2 = new Struct!Object;
    t1.vaue = 20;
    
    fun(t1);
    fun(t2);
    
   /* CC!(int,string) it = new CC!(int,string)();
    
    it.showC();
    
    it.showD(); */
    
    CC!(int,int) it2 = new CC!(int,int)();
    
    it2.showC();
    
    it2.showD();
}
